﻿namespace WebMarkupMin.Example.Mvc
{
	using AutoMapper;

	using Core.Minifiers;
	using Core.Settings;

	using ViewModels;
	using ViewModels.Settings;

	public class MapperConfig
	{
		public static void RegisterMappers()
		{
			Mapper.Initialize(configuration =>
			{
				configuration
					.CreateMap<HtmlMinificationSettings, HtmlMinificationSettingsViewModel>()
					.ReverseMap()
					;
				configuration
					.CreateMap<XhtmlMinificationSettings, XhtmlMinificationSettingsViewModel>()
					.ReverseMap()
					;
				configuration
					.CreateMap<XmlMinificationSettings, XmlMinificationSettingsViewModel>()
					.ReverseMap()
					;
				configuration.CreateMap<MarkupMinificationResult, MarkupMinificationResultViewModel>();
			});
		}
	}
}